package app.form.component;

import java.util.List;

public class Select extends AbstractSelectComponent {
    private List<Float> items;
    public Select (String name, String title, List<Float> items) {
        super(name, title, items);
    }
    
    @Override
    public String renderCSS () {
        StringBuilder s = new StringBuilder ();
        s.append (".select {}");
        s.append (".select select {}");
        return s.toString();
    }

    @Override
    protected String getType() {
        return "select";
    }

    @Override
    protected String getItemHTML(Float value, int index) {
        return "<option value='" + value.toString() + "'>" + value.toString() + "</option>";
    }

    @Override
    protected String getTopHTML() {
        return "<select name='" + getName() + "'>";
    }

    @Override
    protected String getBottomHTML() {
        return "</select>";
    }

    
}
